home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libg++ / vms / VMS-TEST-LIBGXX.COM < prev   
Text File  |  1992-05-02  |  3KB  |  109 lines

  1. $set noon
  2. $!
  3. $! go to the vms subdirectory in the libg++ distribution tree
  4. $flnm = f$enviroment("PROCEDURE")    ! get current procedure name
  5. $set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
  6. $!
  7. $! go to the directory where the test files reside.
  8. $set def [-.tests]
  9. $! make sure that the symbols are defined properly.
  10. $genclass:==@gnu_cc:[000000]genclass
  11. $cxshare:==@gnu_cc:[000000]cxshare
  12. $!
  13. $gloop:
  14. $filenm = f$search("GNU_GXX_INCLUDE:[GEN]*.*",0)
  15. $if filenm.eqs."" then goto gdone
  16. $! if both a .HP and a .CCP file exist, do only one of them
  17. $name = f$parse(filenm,,,"NAME")
  18. $type = f$parse(filenm,,,"TYPE")
  19. $if type.eqs.".HP" then goto generate
  20. $file1 = f$parse(filenm-".CCP",".HP")
  21. $if f$search(file1,1).nes."" then goto gloop
  22. $!
  23. $generate:
  24. $set ver
  25. $genclass -2 "int" val "int" val 'name'
  26. $! 'f$verify(0)
  27. $goto gloop
  28. $gdone:
  29. $!
  30. $lib/create ilib
  31. $create compile_these.list
  32.  ILIST ISLLIST IDLLIST IVEC IAVEC 
  33.  IPLEX  IFPLEX  IXPLEX IRPLEX IMPLEX 
  34.  ISET IBAG IMAP IPQ 
  35.  IXPSET  IOXPSET  ISLSET  IOSLSET  IBSTSET ICHNODE 
  36.  IAVLSET  ISPLAYNODE ISPLAYSET  IVHSET  IVOHSET  ICHSET 
  37.  IXPBAG  IOXPBAG  ISLBAG  IOSLBAG  ISPLAYBAG IVHBAG  ICHBAG 
  38.  IVHMAP  ICHMAP  ISPLAYMAP  IAVLMAP IRAVLMAP 
  39.  ISPLAYPQ  IPHPQ  IXPPQ 
  40.  IVSTACK IVQUEUE ISTACK IQUEUE IDEQUE 
  41.  IXPSTACK ISLSTACK IXPQUEUE  ISLQUEUE IXPDEQUE IDLDEQUE 
  42. $!
  43. $!
  44. $loop:
  45. $filenm = f$search("i*.cc")
  46. $name = f$parse(filenm,,,"NAME")
  47. $if filenm.eqs."" then goto done
  48. $assign nla0: sys$output
  49. $assign nla0: sys$error
  50. $search compile_these.list " ''name' "/OUTPUT=NLA0:
  51. $stat1 = $status
  52. $deassign sys$output
  53. $deassign sys$error
  54. $if stat1.ne.1 then goto loop
  55. $!
  56. $set ver
  57. $gcc/plus/debug/nolist/define="__OPTIMIZE__" 'name'.CC
  58. $lib ilib 'name'
  59. $! 'f$verify(0)
  60. $if $status then delete/nolog 'name'.obj;
  61. $goto loop
  62. $done:
  63. $delete/nolog compile_these.list;
  64. $!
  65. $!
  66. $tloop:
  67. $filenm = f$search("t*.cc")
  68. $name = f$parse(filenm,,,"NAME")
  69. $if filenm.eqs."" then goto tdone
  70. $set ver
  71. $gcc/plus/debug/nolist/define=("unlink=remove") -
  72.          'name'.CC
  73. $cxshare 'name'+ilib/lib/nomap
  74. $! 'f$verify(0)
  75. $delete/nolog 'name'.obj;
  76. $goto tloop
  77. $tdone:
  78. $!
  79. $!
  80. $open ofile$ run.com/write
  81. $write ofile$ "$set nover"
  82. $write ofile$ "$set default "+f$parse(flnm,,,"DEVICE") -
  83.         +f$parse(flnm,,,"DIRECTORY")-".VMS]"+".TESTS]"
  84. $OPEN IFILE$ [-.vms]EXPECTED.LIST
  85. $rloop:
  86. $  read/end=finish ifile$ line
  87. $  write ofile$ "$write sys$output ""''line'"""
  88. $  write ofile$ "$run ''line'"
  89. $  inp=f$search("''line'.INP",1)
  90. $  if inp.eqs."" then goto rloop
  91. $  open jfile$ 'line'.INP
  92. $rloop1:
  93. $     read jfile$/end=rdone line
  94. $     write ofile$ line
  95. $     goto rloop1
  96. $rdone:
  97. $  close jfile$
  98. $goto rloop
  99. $finish:
  100. $close ofile$
  101. $close ifile$
  102. $write sys$output "Test suite is finished.  Submit the command file RUN.COM"
  103. $write sys$output "to a batch queue, and compare the output to the file"
  104. $write sys$output "EXPECTED.VMS"
  105. $!
  106. $! and go home again.
  107. $!
  108. $set def [-.vms]
  109.